package com.smiletrain.view;

import java.util.ArrayList;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class ListaCaso extends BaseAdapter{

	public ListaCaso(ItemCaso[] values) {
		super();
		ArrayList<ItemCaso> casos = new ArrayList<ItemCaso>();
		for(ItemCaso ic : values)
			if(ic != null)
				casos.add(ic);
		
		ItemCaso[] casos2 = new ItemCaso[casos.size()];
		int i = 0;
		for(ItemCaso ic : casos)
			casos2[i++] = ic;
		
		this.values = casos2;
	}
	
	@Override  
    public int getCount() {  
        return values.length;  
    }  

    @Override  
    public Object getItem(int position) {  
        return null;  
    }  

    @Override  
    public long getItemId(int position) {  
        return 0;  
    }  

    @Override  
    public View getView(int position, View convertView, ViewGroup parent) {  
        values[position].generateView(parent);
        return values[position].getView();
    }
    
    private final ItemCaso[] values;
    
}
